<div id="content">
    <div class="row s_page_title">
        <div class="row s_page_title">
            <sa-big-breadcrumbs [items]="['项目管理','监控项目列表']" icon="fa fa-smile-o" class="col-xs-12 col-sm-7 col-md-7 col-lg-4"></sa-big-breadcrumbs>
        </div>
        <sa-widgets-grid>
            <div class="s_table">
                <div sa-widget [editbutton]="false" color="darken" class="clearfix">
                    <header><span class="widget-icon"> <i class="fa fa-table"></i> </span>
                        <h2>监控项目列表</h2>
                    </header>
                    <div>
                        <div class="widget-body no-padding">
                            <div class="page-header clearfix s_table_opreation">
                                <div class="left page-header-btn" style="width: calc(100% - 230px);">
									<div class="selectDate top_module">
										<table-select-date [notInit]='true' (outerTime)="getSelectTableTime($event)"></table-select-date>
									</div>
                                    <button class="btn btn-primary" (click)="tableSearch()">查询</button>
                                    <button class="btn btn-primary" (click)="addCompany(addCompanyModal)">添加</button>
                                </div>
                                <div class="right top-search">
                                    <input type="text" [(ngModel)]="tableParam.searchKey" (change)="tableSearch()" class="search-input" placeholder="公司名称">
                                    <span class="top-search-box">
                                        <button class="top-search-btn" type="button" (click)="tableSearch()"> <i class="fa fa-search"></i></button>
                                    </span>
                                </div>
                            </div>
                            <div class="table_scroll">
                                <table class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table">
                                    <thead>
                                        <tr>
                                            <th>编号</th>
                                            <th>公司名称</th>
                                            <th>签单单位</th>
                                            <th>创建时间</th>
                                            <th *ngIf="isShowDelete">操作</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr *ngFor="let row of tableData">
                                            <td>{{row.companyId}}</td>
                                            <td>{{row.companyName}}</td>
                                            <td>{{row.signUnit}}</td>
                                            <td>{{row.createTime}}</td>
                                            <td *ngIf="isShowDelete">
                                                <button type="button" (click)="deleteRow(row)">删除</button>
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                            <div class="table-fix clearfix">
                                <paginator [totalRecords]="totalCount" [rows]="pageSize" [currentPage]="curPage - 1" (onPageChange)="paginate($event)">
                                </paginator>
                                <button type="button" class="btn default refresh_btn" (click)="refresh()"><i class="fa fa-refresh"></i></button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </sa-widgets-grid>
        <!-- 单项编辑   弹窗-->
        <section bsModal #addCompanyModal="bs-modal" class="modal fade" role="dialog" tabindex="-1" aria-labelledby="myLargeModalLabel" aria-hidden="true" data-backdrop="static" data-keyboard="false">
            <div class="modal-dialog modal-lg">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" (click)="itemModalClose(addCompanyModal)" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title">添加环卫公司</h4>
                    </div>
                    <div class="modal-body">
                        <form id="addCompanyFrom" class="form-horizontal" role="form" novalidate="novalidate" [saBootstrapValidator]="validatorOption">
                            <div class="row form-horizontal">
								<div class="form-group clearfix">
									<label class="control-label col-md-3 col-sm-3 no-padding-right">公司名称<sup>*</sup></label>
									<div class="col-sm-9">
										<sa-company-tree inputName="selectedCompanyName" [Height]="32" [companyNameValue]="selectedCompanyName" [companyIdValue]="selectedCompanyId" companyTreeId="companyTree7" (companySelected)="factorySelected($event)"></sa-company-tree>
									</div>
								</div>
		
								<div class="form-group">
									<label class="col-md-3 control-label">公司ID<sup>*</sup></label>
									<div class="col-md-9">
										<input name="selectedCompanyId" readonly id="selectedCompanyId" [(ngModel)]="selectedCompanyId" type="text" class="form-control form-control-sm" placeholder="公司ID">
									</div>
								</div>
								<!-- <div class="form-group">
									<label class="col-md-3 control-label">是否带RFID</label>
									<div class="col-md-9" (click)="isOpenCycleClick()">
										<span style="margin-top:7px" class="el-checkbox__inner" [ngClass]="{'is-checked':isRfid}"></span>
									</div>
								</div> -->
								<!-- <div class="form-group">
									<label class="col-md-2 control-label"></label>
									<div class="col-md-9" (click)="isOpenCycleClick()">
										<span class="el-checkbox__inner" [ngClass]="{'is-checked':isRfid}"></span>
										<span> 是否带RFID<sup>*</sup></span>
									</div>
								</div> -->

								<div class="form-group">
									<label class="col-md-3 control-label">签单单位</label>
									<div class="col-md-9">
										<input name="signUnit" id="signUnit" [(ngModel)]="signUnit" type="text" class="form-control form-control-sm" placeholder="签单单位">
									</div>
								</div>
							</div>
                        </form>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" (click)="itemModalClose(addCompanyModal)">取消</button>
                        <button type="button" class="btn btn-primary" (click)="itemModalSubmit(addCompanyModal)">确认</button>
                    </div>
                </div>
            </div>
        </section>
        <!-- 单项编辑 弹窗end-->

        <!-- 查看回复详情   弹窗-->
        <section bsModal #messageModal="bs-modal" class="modal fade" role="dialog" tabindex="-1" aria-labelledby="myLargeModalLabel" aria-hidden="true" data-backdrop="static" data-keyboard="false">
            <div class="modal-dialog modal-lg">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" (click)="itemModalClose(messageModal)" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title">{{title}}</h4>
                    </div>
                    <div class="modal-body">
                        <div class="row form-horizontal">
                            <div class="form-group col-xs-12" style='word-break: break-all;'>
                                <span>{{content}}</span>
                            </div>
                        </div>
                    </div>
                    <!-- <div class="modal-footer">
					<button type="button" class="btn btn-default" (click)="itemModalClose(messageModal)">取消</button>
					<button type="button" class="btn btn-primary" (click)="itemModalSubmit(messageModal)">确认</button>
				</div> -->
                </div>
            </div>
        </section>
        <!-- 查看回复详情 弹窗end-->
    </div>